﻿@model WXDepartmentSitModel

@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<div class="panel panel-default table-responsive">
    <div class="panel-heading">
        部门列表
    </div>
    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                <th>部门ID</th>
                <th>部门名称</th>
                <th>父级部门ID</th>
            </tr>
        </thead>
        <tbody>
            @foreach (var dep in Model.DepartmentResult.department)
            {
                <tr>
                    <td>@dep.id</td>
                    <td>@dep.name</td>
                    <td>@dep.parentid</td>
                </tr>
            }
        </tbody>
    </table>
</div>

@using (Ajax.BeginForm("updatedepartment", "home", new { }, new AjaxOptions { LoadingElementId = "loadingmsg", InsertionMode = InsertionMode.Replace, HttpMethod = "Post", UpdateTargetId = "main-content" }, new { @class = "form-horizontal", role = "form" }))
{
    <div class="panel panel-default">
        <ul class="list-group ">
            <li class="list-group-item">
                <div class="input-group ">
                    @Html.Label("部门ID", new {  @class = "input-group-addon" })
                    @Html.TextBoxFor(m => m.DepModel.id, new { @class = "form-control  ", placeholder = "ID" })
                </div>
            </li>
            <li class="list-group-item">
                <div class="input-group ">
                    @Html.Label("部门名称", new { @for = "Password", @class = "input-group-addon" })
                    @Html.TextBoxFor(m => m.DepModel.name, new { @class = "form-control ", placeholder = "部门名称" })
                </div>
            </li>
            <li class="list-group-item">
                <div class="input-group ">
                    @Html.Label("父级ID", new { @for = "ConfirmPassword", @class = "input-group-addon" })
                    @Html.PasswordFor(m => m.DepModel.parentid, new { @class = "form-control  ", placeholder = "父级ID" })
                </div>
            </li>
            <li class="list-group-item">
                <div class="input-group ">
                    @Html.Label("排序", new { @for = "ConfirmPassword", @class = "input-group-addon" })
                    @Html.PasswordFor(m => m.DepModel.order, new { @class = "form-control  ", placeholder = "排序" })
                </div>
            </li>
            <li class="list-group-item">
                <div class="radio radio-inline">
                    <label>
                        <input type="radio" name="OptType" id="optionsRadios1" value="add" checked>
                        新建
                    </label>
                </div>
                <div class="radio radio-inline">
                    <label>
                        <input type="radio" name="OptType" id="optionsRadios2" value="update">
                        更新
                    </label>
                </div>
                <div class="radio radio-inline">
                    <label>
                        <input type="radio" name="OptType" id="optionsRadios3" value="del">
                        删除
                    </label>
                </div>
            </li>
          
            <li class="list-group-item">
                <div class="row">
                    <div class="col-xs-6">
                        <input type="submit" class="btn  btn-primary btn-lg " value="提交" />
                    </div>
                </div>
            </li>
        </ul>
    </div>
}
